<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="/WEB-INF/struts-tags.tld" prefix="s"%> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>喜乐康智能家居系统</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
  	<script type="text/javascript">
  	var idType = 1;
	var scheduleType = 1;
  	var advancedDeviceId = 0;
  	var pressAdvancedClass;
  
  	function settingAdvancedDeviceListDown(upDown){

  		settingDown("setting_advanced_device_room_list","setting_advanced_device_left1_down",230,upDown);
  	}

  	function settingAdvancedDeviceListUp(upDown){
  		settingUp("setting_advanced_device_room_list","setting_advanced_device_left1_up",upDown);
  		
	}

	function pressRightDeviceAdvanced(deviceId,deviceType){
		var className = $("#setting_advanced_device_room_list_detail_img_li"+deviceId).attr("className");
  		if(advancedDeviceId!=0){
  			$("#setting_advanced_device_room_list_detail_img_li"+advancedDeviceId).attr("className",pressAdvancedClass);
  		}
  		pressAdvancedClass = className;
  		advancedDeviceId = deviceId;
  		if(className.indexOf("device_use_img_li_on_off") != -1){
  			$("#setting_advanced_device_room_list_detail_img_li"+deviceId).attr("className","device_use_img_li_on_off_press_s");
  		}else if(className.indexOf("device_use_img_li_turn") != -1){
  			$("#setting_advanced_device_room_list_detail_img_li"+deviceId).attr("className","device_use_img_li_turn_press_s");
  		}else if(className.indexOf("device_use_img_li_socket") != -1){
  			$("#setting_advanced_device_room_list_detail_img_li"+deviceId).attr("className","device_use_img_li_socket_press_s");
  		}

  		$("#setting_device_schedule").load(evn_Path+"setting!settingAdvancedDeviceSchedule.do?deviceId="+deviceId);
  		$(".setting_advanced_device_right").load(evn_Path+"setting!settingAdvancedDeviceScheduleTime.do");
	};
  	</script>
  	
  </head>
  
  <body>
  	<div class="setting_advanced_device_left">
  		<div style="height: 240px;width: 304px;">
	  		<div class="setting_advanced_detail_left">
	  			<div class="setting_advanced_device_room_list">
	  				<s:iterator value="roomList" id="room">
	  					<div class="setting_advanced_device_room_list_detail" id="setting_advanced_device_room_list_detail<s:property value="roomId"/>">
	  						<div style="width: 50px;float:left;font-size: 13px;font-weight: bold;margin-top: 5px;"><s:property value="roomName"/></div>
	  						<div style="width: 190px;float:left;margin-left: 5px;" id="setting_advanced_device_room_list_detailList<s:property value="roomId"/>">
	  							<s:iterator id="device" value="deviceList" status="status">
	  								<div name="settingAdvancedDeviceListName" deviceId="<s:property value="deviceId"/>" onclick="pressRightDeviceAdvanced(<s:property value="deviceId"/>,<s:property value="deviceType"/>)" isOpen="<s:property value="isOpen"/>" level="<s:property value="level"/>"  id="setting_advanced_device_room_list_detail_img_li<s:property value="deviceId"/>" 
										
										<s:if test="deviceType==1">
						   					class="device_use_img_li_on_off_s"
										</s:if>
										
										<s:elseif test="deviceType==2">
											class="device_use_img_li_turn_s"
										</s:elseif>
						   				<s:elseif  test="deviceType==3">
											class="device_use_img_li_socket_s"
										</s:elseif>	
										style="position: relative;margin-bottom:12px;font-size:12px;"
										
										><s:property value="deviceName"/>
									</div>
	  							</s:iterator>
	  						</div>
	  						<div class="clear"></div>
	  					</div>
	  				</s:iterator>
	  			</div>
	  			
	  		</div>
	  		<div class="setting_advanced_device_left1_up_down">
	  			<div class="setting_advanced_device_left1_up" onmousedown="settingAdvancedDeviceListUp('down')" onmouseup="settingAdvancedDeviceListUp('up')"></div>
	  			<div class="setting_advanced_device_left1_middle"></div>
	  			<div class="setting_advanced_device_left1_down" onmousedown="settingAdvancedDeviceListDown('down')" onmouseup="settingAdvancedDeviceListDown('up')"></div>
	  		</div>
  		</div>
  		<div id="setting_device_schedule" style="height: 157px;width: 304px;">
  			
  		</div>
  	</div>
	<div class="setting_advanced_device_right">
		
	</div>
  </body>
</html>
